//
//  BattlingView.h
//  Dispatch
//
//  Created by hyeyeon on 14. 2. 5..
//  Copyright (c) 2014년 hyeyeon. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>

#import "AppDelegate.h"
#import "ViewController.h"
#import "PhotoViewController.h"
#import "NKLabel.h"
#import "NewsViewController.h"
#import "CommonView.h"

//ad
#import "ManBreakAdView.h"

#import "PopupView.h"

@interface BattlingView : CommonView <ManBreakAdViewDelegate, PopupViewDelegate>
{
    
    AppDelegate *appDelegate;
    
    //네트워크 받는중
    BOOL duringNetwork;
    
    //맨처음 호출인지 체크
    BOOL checkFirst;
    
    
    //icon
    CAShapeLayer *centerIconPathLayer;
    
    //vs
    UIButton *firstSelect;
    UIButton *secondSelect;
    UILabel *firstTitle;
    UILabel *secondTitle;
    UIImageView *firstImageView;
    UIImageView *secondImageView;
    float selectBtncenterY;
    
    //win
    UIView *winView;
    UIImageView *winImageView;
    UIView *winBGView;
    NKLabel *winLabel;
    NKLabel *loseLabel;
    
    //기사보기
    UIButton *firstNewsButton;
    UIButton *secondNewsButton;
    
    //로딩
    UIView *loadingView;
    NSInteger currentLoadingIndex;  //현재 뭘 로딩하고있는지 구분하기 위함
    NSInteger mGender;  //0:없음 1:남 2:여  //배틀준비인지 아닌지를 구분
    BOOL firstWon;  //왼쪽아가 이겼을때 예스
    BOOL nofirstLoading;
    BOOL firstLoading;  //10명부르는거 첨일때
    UIActivityIndicatorView *activityView;
    UIView *smallLoadingView;
    NSTimer *loadingTimer;
    
    //ad
    ManBreakAdView *manBreakAdView;
    
}
@property (nonatomic, strong) NSMutableData *responseData;
@property (nonatomic, assign) NSInteger firstIndex;
@property (nonatomic, retain) NSString *imageURL;
@property (nonatomic, retain) NSArray *itemArray;
@property (nonatomic, retain) NSArray *toptenArray;
@property (nonatomic, retain) NSMutableArray *totalArray;
@property (nonatomic, retain) NSArray *rankingArray;
@property (nonatomic, retain) NSMutableArray *tenArray;
@property (nonatomic, retain) NSMutableArray *imageTenArray;
@property (nonatomic, retain) NSMutableDictionary *imageTenDic;

@property (nonatomic, retain) NSDictionary *firstDic;
@property (nonatomic, retain) NSDictionary *secondDic;

//현재 부른 ?개 데이타 스타아이ㄷㅣ
@property (nonatomic, retain) NSString *currentStarIDs;


-(void)didAppear;
@end
